package com.bkgy.modularbx.theme.domain;

import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 主题数据表
 * @TableName TB_DSJ_THEME_DATA
 */
@TableName(value ="TB_DSJ_THEME_DATA")
public class ThemeData {
    /**
     * 主题组id
     */
    @NotNull(message = "主题组id不可以为空")
    private String themeGroupId;

    /**
     * 主题变量名=数据字典的变量名
     */
    @NotNull(message = "主题变量名不可以为空")
    private String themeVariable;

    /**
     * 产线
     */
    private String productionLine;

    /**
     * 主题变量描述
     */
    private String themeVariableDescription;

    /**
     * 创建时间
     */
    private Date toc;

    /**
     * 修改时间
     */
    private Date tom;

    /**
     * 主题组id
     */
    public String getThemeGroupId() {
        return themeGroupId;
    }

    /**
     * 主题组id
     */
    public void setThemeGroupId(String themeGroupId) {
        this.themeGroupId = themeGroupId;
    }

    /**
     * 主题变量名=数据字典的变量名
     */
    public String getThemeVariable() {
        return themeVariable;
    }

    /**
     * 主题变量名=数据字典的变量名
     */
    public void setThemeVariable(String themeVariable) {
        this.themeVariable = themeVariable;
    }

    /**
     * 产线
     */
    public String getProductionLine() {
        return productionLine;
    }

    /**
     * 产线
     */
    public void setProductionLine(String productionLine) {
        this.productionLine = productionLine;
    }

    /**
     * 主题变量描述
     */
    public String getThemeVariableDescription() {
        return themeVariableDescription;
    }

    /**
     * 主题变量描述
     */
    public void setThemeVariableDescription(String themeVariableDescription) {
        this.themeVariableDescription = themeVariableDescription;
    }

    /**
     * 创建时间
     */
    public Date getToc() {
        return toc;
    }

    /**
     * 创建时间
     */
    public void setToc(Date toc) {
        this.toc = toc;
    }

    /**
     * 修改时间
     */
    public Date getTom() {
        return tom;
    }

    /**
     * 修改时间
     */
    public void setTom(Date tom) {
        this.tom = tom;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ThemeData other = (ThemeData) that;
        return (this.getThemeGroupId() == null ? other.getThemeGroupId() == null : this.getThemeGroupId().equals(other.getThemeGroupId()))
            && (this.getThemeVariable() == null ? other.getThemeVariable() == null : this.getThemeVariable().equals(other.getThemeVariable()))
            && (this.getProductionLine() == null ? other.getProductionLine() == null : this.getProductionLine().equals(other.getProductionLine()))
            && (this.getThemeVariableDescription() == null ? other.getThemeVariableDescription() == null : this.getThemeVariableDescription().equals(other.getThemeVariableDescription()))
            && (this.getToc() == null ? other.getToc() == null : this.getToc().equals(other.getToc()))
            && (this.getTom() == null ? other.getTom() == null : this.getTom().equals(other.getTom()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getThemeGroupId() == null) ? 0 : getThemeGroupId().hashCode());
        result = prime * result + ((getThemeVariable() == null) ? 0 : getThemeVariable().hashCode());
        result = prime * result + ((getProductionLine() == null) ? 0 : getProductionLine().hashCode());
        result = prime * result + ((getThemeVariableDescription() == null) ? 0 : getThemeVariableDescription().hashCode());
        result = prime * result + ((getToc() == null) ? 0 : getToc().hashCode());
        result = prime * result + ((getTom() == null) ? 0 : getTom().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", themeGroupId=").append(themeGroupId);
        sb.append(", themeVariable=").append(themeVariable);
        sb.append(", productionLine=").append(productionLine);
        sb.append(", themeVariableDescription=").append(themeVariableDescription);
        sb.append(", toc=").append(toc);
        sb.append(", tom=").append(tom);
        sb.append("]");
        return sb.toString();
    }
}